import { api, request } from '@/api/request.js'

//? 根据产品 ID 获取评论
export const getReviewsByProductId = (productId) => request(api.get, `/api/reviews/product/${productId}`)

//? 添加评论
export const createReview = (review) => request(api.post, '/api/reviews', { ...review, id: null })